//
//  UIView+Extension.swift
//  WeiBo001
//
//  Created by geduo on 2018/5/10.
//  Copyright © 2018年 geduo. All rights reserved.
//

import UIKit

extension UIView{
    
    var x: CGFloat {
        get{
            return frame.origin.x;
        }set{
            
            frame.origin.x = newValue;
        }
    }
    
    var y: CGFloat {
        get{
            return frame.origin.y;
        }set{
            
            frame.origin.y = newValue;
        }
    }
    
    var width: CGFloat{
        get{
            return frame.size.width;
        }set{
            return frame.size.width = newValue;
        }
        
    }
    
    var height: CGFloat{
        get{
            return frame.size.height;
        }set{
            return frame.size.height = newValue;
        }
    }
    
    var centerX: CGFloat{
        get{
            return center.x;
        }set{
            return center.x = newValue;
        }
    }
    
    var centerY: CGFloat{
        get{
            return center.y;
        }set{
            return center.y = newValue;
        }
    }
    
    
    var size : CGSize{
        get{
            
            return frame.size;
        }set{
            return frame.size = newValue;
        }
        
    }
    
    
    
}
